import entityExtension from './entityExtension'
import PowerCreepExtension from './extension'
import { assignPrototype } from 'utils/utils'


/**
 * 挂载 RoomPosition 拓展
 */
 export default () => {
    // 保存原始 move，在 creepExtension 里会进行修改
    if (!PowerCreep.prototype._move) PowerCreep.prototype._move = Creep.prototype._move as any
    if (!PowerCreep.prototype._say) PowerCreep.prototype._say = PowerCreep.prototype.say
    if (!PowerCreep.prototype._withdraw) 
    {
        PowerCreep.prototype._withdraw = Creep.prototype._withdraw
    }
    assignPrototype(PowerCreep, PowerCreepExtension)
    assignPrototype(PowerCreep, entityExtension)
    
}
